package com.itheima.work1117;

public class CalculatorDemo {
    public static void useCalculator(Calculator calr) {
        System.out.println(calr.calc(2, 5));

    }
    public static void main(String[] args) {
        // 创建一个Calculator接口的Lambda表达式实现
        //返回a+b的和（返回int值类型）
        Calculator calrs = (a,b)-> a+b;
        useCalculator(calrs);
    }
}
